package cn.lili.controller.feign.wallet;

import cn.lili.modules.payment.client.RechargeClient;
import cn.lili.modules.payment.entity.dto.PaymentCallback;
import cn.lili.modules.wallet.handler.RechargeCashier;
import cn.lili.modules.wallet.service.RechargeService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

/**
 * 充值业务 feign client
 *
 * @author Chopper
 * @version v1.0
 * 2021-11-17 18:06
 */
@RestController
@RequiredArgsConstructor
public class RechargeFeignController implements RechargeClient {

    private final RechargeService rechargeService;

    private final RechargeCashier rechargeCashier;


    @Override
    public void autoCancel() {
        rechargeService.autoCancel();
    }

    @Override
    public void paymentCallback(PaymentCallback paymentCallback) {
        rechargeCashier.paymentCallback(paymentCallback);
    }
}
